﻿using System;
using System.Windows.Forms;
using YArchitech.LIB;

namespace YArchitech.Controls
{
	public class YJKMessageBox
	{
		public static DialogResult Information(string text)
		{
			return MessageBox.Show(text, Resources.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
		}

		public static DialogResult Warning(string text)
		{
			return MessageBox.Show(text, Resources.MessageBoxTitle, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
		}

		public static DialogResult Error(string text)
		{
			return MessageBox.Show(text, Resources.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Hand);
		}

		public static void Show(string message)
		{
			if (string.IsNullOrEmpty(message))
			{
				return;
			}
			MessageBox.Show(message, Resources.MessageBoxTitle);
		}

		public static DialogResult Show(string message, MessageBoxButtons buttons)
		{
			return MessageBox.Show(message, Resources.MessageBoxTitle, buttons);
		}

		public static DialogResult Show(string message, MessageBoxButtons buttons, MessageBoxIcon icon)
		{
			return MessageBox.Show(message, Resources.MessageBoxTitle, buttons, icon);
		}
	}
}
